#ifndef _OPCODES_H
#define _OPCODES_H


enum Opcodes {
	MSG_NULL_ACTION                                 = 0x000,
	CMSG_PING       	                        = 0x001,
	SMSG_PONG	                                = 0x002,
	CMSG_QUERY_TIME					= 0x003,
	SMSG_QUERY_TIME					= 0x003,
	CMSG_USER					= 0x010,	//用户定义协议起始值
	SMSG_USER					= 0x010,	//用户定义协议起始值

	SMSG_TGW_HEADER					= 0x6774,	//服务器应答 TGW 头  tgw_l7_forward
	CMSG_TGW_HEADER					= 0x6774,	//腾讯TGW 头	     tgw_l7_forward
	CMSG_FLASH_POLICY				= 0x703C,	//FLASH 安全策略套接字
	NUM_MSG_TYPES 					= 0x200 
};

//flash 客户端请求安全策略文件长度
#define FLASH_POLICY_REQ_LEN			23

/*
char	FLASH_POLICY_FILE[] =	"<?xml version=\"1.0\"?>\n"	\
				"<cross-domain-policy>\n"	\
    				"  <site-control permitted-cross-domain-policies=\"all\"/>\n"	\
    				"  <allow-access-from domain=\"*\" to-ports=\"*\" />\n"	\
				"</cross-domain-policy>\n\x00";
*/

//得到修正版协议长度
uint16  getOpcodeFixLength(const uint16 & opcode,const uint16 & length);


#endif
